import * as services from "../init";

const manages = {
    ...services
};

export function Inject(serviceName:string) {
    return function (target:Object, key: string) {
        Object.defineProperty(target, key, {
            get(): any {
                const Service = manages[serviceName];

                if(!!Service)
                    return Service.instance;

                return null
            }
        })
    }
}
